azurerm_databricks_workspace_serverless - add resource and data source#31695
azurerm_databricks_workspace_serverless - add resource and data source#31695v-yhyeo0202 wants to merge 34 commits intohashicorp:mainfrom
azurerm_databricks_workspace_serverless - add resource and data source#31695Conversation
…space-serverless-draft-0
…n `make fmt; make terrafmt; make document-fix`
azurerm_databricks_serverless_workspace - add resource and data sourceazurerm_databricks_workspace_serverless - add resource and data source
|
What about naming it |
After some discussions, we decide to use the name
|
gerrytan
left a comment
There was a problem hiding this comment.
Thank you @v-yhyeo0202 I haven't done complete review, but I left few concerns I have based on initial look at the design of this new resource.
| ComputeMode: workspaces.ComputeModeServerless, | ||
| Encryption: encryption, | ||
| EnhancedSecurityCompliance: r.expandDatabricksWorkspaceServerlessEnhancedSecurityComplianceDefinition(config.EnhancedSecurityCompliance), | ||
| PublicNetworkAccess: &publicNetworkAccess, |
There was a problem hiding this comment.
I try to create private endpoint connections in Databricks workspace networking Azure portal interface as shown above and compared this with the private endpoint connection created through TestAccDatabricksWorkspace_privateLink. The test configurations manage to create private endpoint connection with azurerm_private_endpoint, which I think should be same as the one created through privateEndpointConnection.
Currently the same private endpoint connection creation configurations are applied in TestAccDatabricksWorkspaceServerless_complete. However, after a more detailed check, I cannot find the similar steps to create private endpoint connection for Databricks serverless workspace through Azure portal. The serverless workspace seems to rely on different mechanism to establish private connection than hybrid workspace. I will investigate deeper into Databricks to find out the correct method to create private connection.
There was a problem hiding this comment.
I have added TestAccDatabricksWorkspaceServerless_privateLink to validate the private endpoint creation in Databrick serverless workspace. It is tested that private endpoint can be created through the Terraform configuration listed in the test, similar as that created through Azure portal.
| ComputeMode: workspaces.ComputeModeServerless, | ||
| Encryption: encryption, | ||
| EnhancedSecurityCompliance: r.expandDatabricksWorkspaceServerlessEnhancedSecurityComplianceDefinition(config.EnhancedSecurityCompliance), | ||
| PublicNetworkAccess: &publicNetworkAccess, |
There was a problem hiding this comment.
Please also call out in the PR description that we're intentionally omitting custom_properties because all sub-properties not supported in the serverless. Include a link to the REST API doc: https://learn.microsoft.com/en-us/rest/api/databricks/workspaces/create-or-update?view=rest-databricks-2026-01-01&tabs=HTTP#workspacecustomparameters
There was a problem hiding this comment.
The information has been added.
| return sdk.ResourceFunc{ | ||
| Timeout: 30 * time.Minute, | ||
| Func: func(ctx context.Context, metadata sdk.ResourceMetaData) error { | ||
| ctx, cancel := context.WithTimeout(ctx, metadata.ResourceData.Timeout(schema.TimeoutCreate)) |
There was a problem hiding this comment.
Is this ctx re-creation necessary? Normally we should just use the ctx passed from the function param
There was a problem hiding this comment.
Initially, I add the ctx re-creation to call defer cancel() with the intention to release the resources associated with the context. However, after checking the code pattern of typed resource, I find that the defer cancel() code is not used. Since ctx is provided through function parameter as you mention, guess the plugin should be able to handle the releasing of resource. The ctx re-creation is removed.
| Type: pluginsdk.TypeString, | ||
| Optional: true, | ||
| ValidateFunc: keyVaultValidate.KeyVaultChildID, | ||
| }, |
There was a problem hiding this comment.
While I understand managed_services_cmk_key_vault_id and managed_services_cmk_key_vault_key_id are existing design from databricks_workspace, I don't like copying it into this new resource because it has inherent performance issue when the tenant has large amount of key vault / keys.
Let's check first if this is feasible and get agreement with HC before we proceed.
…ink and remove context recreation
|
@v-yhyeo0202 @gerrytan Thank you for this. Looking forward for this resource to be available. Any ETA would be helpful. |
|
@venkad-intc, the current ETA is by the end of March. |
…kspaceServerless_privateLink`
|
@v-yhyeo0202 Are we still on track for this EOM release? |
|
@venkad-intc there will be delay for the release due to ongoing schema design discussion. The new ETA is not decided yet. For temporary workaround, please use azapi_resource to create the resource. Let me know if you encounter issue in doing so. |

Community Note
Description
New
azurerm_databricks_workspace_serverlessresource and data source are added. The resource corresponds to Azure Databricks withserverlesscompute_mode. This PR is built on top of commits from #31654. As compared toazurerm_databricks_workspace, thecustom_propertiesproperty is omitted as all the child properties are not allowed whencompute_modeisserverless.PR Checklist
For example: “
resource_name_here- description of change e.g. adding propertynew_property_name_here”Changes to existing Resource / Data Source
(For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.Testing
https://hashicorp.teamcity.com/buildConfiguration/TF_AzureRM_AZURERM_SERVICE_PUBLIC_DATABRICKS/615695?buildTab=overview

Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_databricks_workspace_serverless- add resource and data sourceThis is a (please select all that apply):
Related Issue(s)
Fixes #31218
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the provider.
Note
If this PR changes meaningfully during the course of review please update the title and description as required.